//
//  CDraftList.h
//  HotDisPlus
//
//  Created by yilong zhang on 12-6-29.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CRootCtrlManager.h"
#import "CDraft.h"
#import "CWaterFall.h"

@class CRootCtrlManager;

@protocol DraftListDelegate <NSObject>

@optional
-(void)DidDraftListClicked:(int)index;

@end

@interface CDraftList : UIView <WaterFallDelegate, OperationDelegate>

@property (nonatomic, assign) id<DraftListDelegate> delegate;

@property (nonatomic, assign) CWaterFall    *m_WaterFall;
@property (nonatomic, assign) UIButton      *m_EditBtn;
@property (nonatomic, assign) UIButton      *m_DelBtn;
@property (nonatomic, assign) int           m_nSelDraft;

@property (nonatomic, assign) NSMutableArray*m_Drafts;
@property (nonatomic, assign) CDesCounter   *m_NativeCnt;

@property (nonatomic, assign) BOOL          m_bIsLoad;
@property (nonatomic, retain) CTask         *m_Task;
@property (nonatomic, assign) CDesCounter   *m_NetCnt;

@property (nonatomic, assign) NSMutableArray*m_Tags;

- (id)initWithFrame:(CGRect)frame Size:(CGSize)size;

-(void)OnButtonDown:(UIButton*)sender;
-(NSArray*)GetNativeDrafts;
-(void)GetNetDarfts;
-(void)DidReveiveDrafts:(NSArray*)items;
-(void)CancelTask;
-(void)AddDraftToList:(NSArray*)drafts;
-(void)AddNetDraftToList:(NSArray*)drafts;
-(void)OnDraftSelected:(UIImageView*)sender Tag:(CWaterDrop*)tag;
-(void)DeleteDrafts;
-(void)DeleteDraft:(CDraft*)draft;
-(void)DeleteNetDrafts:(NSArray*)drafts;

@end
